<template>
 <view class="business">
   <view class="nav d_f j_c_c a_i_c">
   	<view class="text">{{name}}</view>
   	<image src="../../static/ct_0031_返回键.png" mode="" class="right" @tap="back"></image>
   </view>
   <image src="../../static/ct_0012_绿色顶.png" mode="" class="header"></image>
   <view class="html">
   	<mp-html :content="html" />
   </view>

 </view>
</template>

<script>
 export default {
   data () {
     return {
        html:"",
		name:'',
     }
   },
   components: {

   },
   methods: {
	   back() {
	   	uni.navigateBack({
	   		delta: 1
	   	});
	   },
    getData(type){
		this.$api.agreeOn({type:type}).then(res=>{
			this.html=res.data.content
		})
	},
	
   },
   onShow() {

   },
   onLoad(options) {
	   this.name=options.name
	   console.log(options);
    uni.setNavigationBarTitle({
    	title: options.name
    });
	this.getData(options.type)
   },
   watch: {

   },
   computed: {

   }
 }
</script>

<style scoped lang='scss'>
.business{
	width: 100%;
	min-height: 100%;
	background: rgb(239, 237, 238);
	position: relative;
	.nav {
		width: calc(100% - 64rpx);
		height: 160rpx;
		margin-left: 32rpx;
		position: relative;
	    z-index: 9999;
		.text {
			font-size: 32rpx;
			font-weight: 700;
		color: #FFFFFF;
		}
	
		.right {
			width: 20rpx;
			height: 32rpx;
			position: absolute;
			left: 0rpx;
			z-index: 999;
			transform: rotate(180deg);
		}
	}
	.header{
		 position: absolute;
		 top: 0rpx;
		 width: 100%;
		 height: 229rpx;
		 z-index: 1;
	}
	.html{
		height: 100%;
		overflow-y: auto;
		padding: 20rpx 30rpx;
		margin-top: 100rpx;
	}
	
}
</style>